from djangoappengine.settings_base import *


SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi'

SITE_ID = 1

INSTALLED_APPS = (
    'dbindexer',
    'djangotoolbox',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.admin',
    'django.contrib.markup',
    'customtags',
    'tagging',
    'hello',
    'filetransfers',
    'pirate_core',
    'pirate_issues',
    'pirate_deliberation',
    'pirate_permissions',
    'pirate_ranking',
    'pirate_consensus',
    'pirate_extensions',
    'pirate_reputation',
    'pirate_messages',
    'pirate_login',
    'pirate_profile',
    'pirate_sources',
    'pirate_comments',
    'pirate_badges',
    'pirate_flags',
    'pirate_social',
    'pirate_forum',
    'pirate_topics',
    'markitup',
    'djangoappengine',
)

MARKITUP_MEDIA_URL = '/static/'
MARKITUP_FILTER = ('markdown.markdown', {'safe_mode': True,'previewParserPath':'/markitup/preview/'})
MARKITUP_SET = 'markitup/sets/markdown'
MARKITUP_SKIN = 'markitup/skins/simple'

JQUERY_URL = '/static/jquery-1.4.2.min.js'

ADMIN_MEDIA_PREFIX = '/media/admin/'

TEST_RUNNER = 'djangotoolbox.test.CapturingTestSuiteRunner'


import os

TEMPLATE_DIRS = (os.path.join(os.path.dirname(__file__), 'templates_alpha'),)

FAIL_SILENTLY = True

GAE_SETTINGS_MODULES = (
    'gae_comments_settings',
)

DJANGO_BUILTIN_TAGS = (
    'native_tags.templatetags.native',
    'django.contrib.markup.templatetags.markup',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'pirate_core.middleware.UrlMiddleware',
    'customtags.middleware.AddToBuiltinsMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    "django.core.context_processors.debug",
    "django.core.context_processors.i18n",
    "django.core.context_processors.media",
    "django.contrib.messages.context_processors.messages",
    "django.core.context_processors.request",
)

DATABASE_ENGINE = 'djangoappengine.db'

try:
    import dbindexer
    DATABASES['native'] = DATABASES['default']
    DATABASES['default'] = {'ENGINE': 'djangoappengine.db', 'TARGET': 'native', 'datastore_path':'/home/fragro/appstore/django_appstore','history_path':'/home/fragro/appstore/django_histstore'}
    DBINDEXER_SITECONF = 'dbindexes'
    MIDDLEWARE_CLASSES = ('dbindexer.middleware.DBIndexerMiddleware',) + \
                         MIDDLEWARE_CLASSES
except ImportError:
    pass
